﻿@model Case
@{
    ViewBag.Title = "Summary";
}

<table class='atbl'>
<tr><td>Titlu</td><td><span id="summarytitle">@Model.Title</span></td></tr>
    <tr>
        <td>
            Data înregistrării
        </td>
        <td>@Model.CreatedDate.ToShortDateString()
        </td>
    </tr>
    <tr>
        <td>
            Tipul dosarului
        </td>
        <td>@Model.Type.Title
        </td>
    </tr>
    <tr>
        <td>
            Indicele dosarului
        </td>
        <td>@Model.Index.Title
        </td>
    </tr>
    <tr>
        <td>
            Dosarul revizuit
        </td>
        <td>@Model.RevisedTitle
        </td>
    </tr>
    <tr>
        <td>
            Numărul de referinţă
        </td>
        <td>@Model.RevisedNumber
        </td>
    </tr>
    <tr>
        <td>
            Categoria
        </td>
        <td>@Model.MainCaseType.Title
        </td>
    </tr>
    <tr>
        <td>
            Numărul dosarului
        </td>
        <td>@Model.Number
        </td>
    </tr>
    <tr>
        <td>
            Esenţa cauzei
        </td>
        <td>@Model.Nature
        </td>
    </tr>
    <tr>
        <td>
            Participanţi
        </td>
        <td>
        <ul>
            @foreach (Party p in Model.Parties)
            {
                <li>
                    <div style="width: 200px; float: left;">@p.TypeParty.Title</div>
                    <div style="width: 150px; float: left;">@Extensions.GetPersonName(p.Person)</div>
                    <div style="width: 80px; float: left;">
                        @if (p.Person.DateOfBirth.HasValue) { p.Person.DateOfBirth.Value.ToShortDateString(); }</div>
                    <div style="width: 200px; float: left;">@Extensions.GetPersonAddress(p.Person)</div>
                </li>
            }
            </ul>
        </td>
    </tr>
    <tr>
        <td>
            Documente
        </td>
        <td>
        <ul>
            @foreach (Icms.Core.Model.File f in Model.Files)
            {
                <li>
                    <div style="width: 100px; float: left;">@f.Title</div>
                    <div style="width: 100px; float: left;">@f.Subject</div>
                    <div style="width: 100px; float: left;">@Html.ActionLink("Download", "download", "File", new { f.Id }, new { @class = "abtn" })</div>
                </li>
            }
            </ul>
        </td>
    </tr>
</table>
